package com.ubtechinc.cruzr.libai.honglauncher;

import java.util.Arrays;
import java.util.List;

import io.reactivex.Observable;
import io.reactivex.Scheduler;
import io.reactivex.functions.Consumer;
import io.reactivex.schedulers.Schedulers;

public class AppInfoControlImp implements AppInfoControl {

    public static class AppInfoRepositoryImpHolder {
        static final AppInfoControl appInfoRepository = new AppInfoControlImp();
    }

    public static AppInfoControl getInstant() {
        return AppInfoRepositoryImpHolder.appInfoRepository;
    }

    private AppInfoControlImp() {
    }

    @Override
    public List<String> getAdminAppInfo() {
        String first[] = App.getContext().getResources().getStringArray(R.array.admini_list);
        return Arrays.asList(first);
    }

    @Override
    public List<String> getHeaderViewAppInfo() {
        String first[] = App.getContext().getResources().getStringArray(R.array.firt_page_list);
        return Arrays.asList(first);
    }

    @Override
    public List<String> getFilterAppInfo() {
        String first[] = App.getContext().getResources().getStringArray(R.array.filter_list);
        return Arrays.asList(first);
    }

    @Override
    public List<String> getVisitAppInfo() {
        String first[] = App.getContext().getResources().getStringArray(R.array.visit_list);
        return Arrays.asList(first);
    }

    /**
     * 持久化管理员应用数据到Room
     *
     * @param appData
     */
    public void saveAdminAppInfoToDB(List<String> appData) {

    }
}
